import QtQuick 1.0

Rectangle {
    id: window
    width: 800; height: 480

    property string currentType: ""


    QRTypes{ id: qrTypes }

    Row {
        Rectangle {
            width: 220; height: window.height
            color: "#efefef"

            ListView {
                focus: true
                id: categories
                anchors.fill: parent
                model: qrTypes
                footer: quitButtonDelegate
                delegate: QRTypesDelegate{}
                highlight: Rectangle { color: "steelblue" }
                highlightMoveSpeed: 9999999
            }
//            ScrollBar {
//                scrollArea: categories; height: categories.height; width: 8
//                anchors.right: categories.right
//            }
        }
//        ListView {
//            id: list
//            width: window.width - 220; height: window.height
//            model: feedModel
//            delegate: NewsDelegate {}
//        }        

    }
    Component {
        id: quitButtonDelegate
        Item {
            width: categories.width; height: 60
            Text {
                text: "Quit"
                font { family: "Helvetica"; pixelSize: 16; bold: true }
                anchors {
                    left: parent.left; leftMargin: 15
                    verticalCenter: parent.verticalCenter
                }
            }
            MouseArea {
                anchors.fill: parent
                onClicked: Qt.quit()
            }
        }
    }  

    Rectangle { x: 220; height: window.height; width: 1; color: "#cccccc" }
}
